
//分类数据模型
class CategoryBigModel {
  String mallCategoryId; //类别编号
  String mallCategoryName;//类别名称
  List<dynamic> bxMallSubDto; //子分类数据
  Null comments;
  String image; //商品图片

  CategoryBigModel({
    this.mallCategoryId,
    this.mallCategoryName,
    this.bxMallSubDto,
    this.comments,
    this.image
  });

  factory CategoryBigModel.fromJson(dynamic json){
     return CategoryBigModel(
       mallCategoryId:json['mallCategoryId'],
       mallCategoryName:json['mallCategoryName'],
       bxMallSubDto:json['bxMallSubDto'],
       comments:json['comments'],
       image:json['image']
     );
  }
}
//列表数据模型
class CategoryBigListModel{
  List<CategoryBigModel> data;
  CategoryBigListModel({
    this.data
  });
  factory CategoryBigListModel.fromJsonLsit(List jsonList){
    return CategoryBigListModel(
      data:jsonList.map( (e) => CategoryBigModel.fromJson(e)).toList()
    );
  }
}


//子分类数据模型
class BxMallSubDto {
  String mallSubId;
  String mallCategoryId;
  String mallSubName;
  String comments;
  BxMallSubDto({this.mallSubId,this.mallCategoryId,this.mallSubName,this.comments});
  factory BxMallSubDto.fromJons(dynamic json){
     return BxMallSubDto(
       mallSubId:json['mallSubId'],
       mallCategoryId:json['mallCategoryId'],
       mallSubName:json['mallSubName'],
       comments:json['comments'],
     );
  }
}


//分类商品的数据模型
class CategoryGoodItemModel {
  String image;
  double oriPrice;
  double presentPrice;
  String goodsName;
  String goodsId;

  CategoryGoodItemModel({this.image,this.oriPrice,this.presentPrice,this.goodsName,this.goodsId});

  factory CategoryGoodItemModel.fromJson(dynamic json){
    return CategoryGoodItemModel(
      image:json['image'],
      oriPrice:json['oriPrice'],
      presentPrice:json['presentPrice'],
      goodsName:json['goodsName'],
      goodsId:json['goodsId']
    );
  }
}

//分类商品列的表据模型
class CategoryGoodListModel{
  List<CategoryGoodItemModel> data;
  CategoryGoodListModel({this.data});
  factory CategoryGoodListModel.fromJsonLsit(List jsonlist){
    return CategoryGoodListModel(
      data:jsonlist.map((elm){
        return CategoryGoodItemModel.fromJson(elm);
      }).toList()
    );
  }
}
